package JD;

import java.util.Scanner;

/**
 * Created by rzd on 2017/4/25.
 */
public class test2 {
    public static void main(String[] args) {
        int n;
        Scanner in = new Scanner(System.in);
        n=in.nextInt();
        int[] tmp = new int[n];
        for (int i = 0; i < n; i++) {
            tmp[i] = in.nextInt();
        }
        int result=0;
        for (int i = 0; i < n; i++) {
            result^=tmp[i];
        }
        System.out.println(result);
    }
}
